<?php

if ($this->session->flashdata('message'))
    echo "<div class='message'>" . $this->session->flashdata('message') . "</div>";
echo validation_errors('<div class="error">', '</div>');
echo '</br>';

echo"<table>";
echo"<tr>";
echo"<td>";
echo '</div>';
echo"</td>";
echo"</tr>";
echo"</table>";


echo'<div class="panel panel-default">';
echo '<div class="panel-heading">Horarios de Médico</div>';
echo '<div class="panel-body">';

if ($citas == null) {
    echo 'No Hay Medicos';
} else {
    echo '<table cellpadding="0" cellspacing="0" border="1" class="table table-striped table-bordered table-condensed table-responsive" id="tblHorarios" width="100%">';
    echo "<thead>\n<tr>\n";
    echo "<th>Fecha</th><th>Hora Inicio</th><th>Hora Fin</th><th>Paciente</th>\n";
    echo '<tbody>';
    foreach ($citas as $fila) {
        echo "<tr valign='top'>\n";
        echo "<td align='left'>" . $fila['fecha'] . "</td>";
        echo "<td align='left'>" . $fila['hora_inicio'] . "</td>";
        echo "<td align='left'>" . $fila['hora_fin'] . "</td>";
        echo "<td align='left'>" . $fila['paciente'] . "</td>";
        echo "</tr>\n";
    }
    echo "</tbody></table>";
}
echo '</div></div>';
echo form_close();

?>
